<div class="row">
<?php
	$cs=Yii::app()->clientScript;
	$baseUrl=$this->module->assetsUrl;
	$cs->registerScriptFile($baseUrl.'/js/systemtool.js',CClientScript::POS_HEAD);
?>
<div class="button-container mb10">
	<?php echo CHtml::link('评论列表',$this->createUrl('comment/index'),array('class'=>'button  button-success'));?>
    <?php echo CHtml::link('设置',$this->createUrl('comment/setting'),array('class'=>'button'));?>
</div>
<?php
//获取字段语言包
$aAttributeLabels = $this->oModel->attributeLabels();
?>
<table class="table table-bordered table-hover">
	<thead>
        <tr>
            <th class="bl0 tc" style="width:60px;"><input type="checkbox" class="btn_all" /> <?php echo $aAttributeLabels['comment_id'] ?></th>
            <th><?php echo $aAttributeLabels['comment_type'] ?></th>
            <th><?php echo $aAttributeLabels['content'] ?></th>
            <th><?php echo $aAttributeLabels['createtime'] ?></th>
            <th><?php echo $aAttributeLabels['status'] ?></th>                    
            <th style="width:100px;">操作</th>
        </tr>
	</thead>
	<tbody>	
    <?php foreach( $list as $aVal ){ ?>
        <tr>
            <td><input type="checkbox" class="ids" name="ids[]" value="<?php echo $aVal['comment_id'];?>" /></td>
            <td><?php echo $aVal['comment_type'] ?></td>
			<td><?php echo $aVal['content'] ?></td>
            <td><?php echo Yii::app()->common->formattime('Y-m-d H:i:s' ,$aVal['createtime']); ?></td>
            <td><span>
            <?php
                echo Yii::app()->user->checkAccess('comment|ajaxCheck') ? 
                     CHtml::link($aVal['status']==1 ? '未通过' : '通过' ,'javascript:void(0)' ,array('url'=>$this->createUrl('comment/ajaxCheck' ,array('comment_id'=>$aVal['comment_id'])) ,'class'=>'ajaxOperateReplace')) : '';
            ?></span></td>	
            <td>
                <?php
                    echo Yii::app()->user->checkAccess('comment|detail') ? 
                         CHtml::link('详细' ,'javascript:void(0);' ,array('onClick'=>"systemTool.showDialog('评论详细' ,600,500 ,'".$this->createUrl('comment/detail' ,array('comment_id'=>$aVal['comment_id']))."')")) : '';
                    echo "\n";
                    echo Yii::app()->user->checkAccess('comment|delete') ? 
                         CHtml::link('删除' ,'javascript:void(0);' ,array('url'=>$this->createUrl('comment/delete' ,array('comment_id'=>$aVal['comment_id'])) ,'class'=>'delete')) : '';
                ?>        
            </td>
        </tr>         
    <?php }?>              
    </tbody>
</table>
<div class="table-bottom-operate">
    <div class="inline pull-left table-operate">
        <?php 
        echo Yii::app()->user->checkAccess('comment|delete') ?
             CHtml::link('批量删除','javascript:void(0);',array('class'=>'button button-primary deleteall','url'=>$this->createUrl('comment/deleteall'))) : ''; ?>
    </div>
    <div class="inline pull-right page">
        <?php $this->widget('LinkPager',array('pages' => $pages)); ?>
    </div>
	
</div>
</div>
<script type="text/javascript">
        
  </script>